//
//  ApplyInfoViewController.swift
//  LongTermInsurance
//
//  Created by zolobdz on 2018/11/22.
//  Copyright © 2018年 HeChao. All rights reserved.
//

import UIKit

class ApplyInfoViewController: BaseViewController {

    
    @IBOutlet weak var descView: UITextView!
    
    @IBOutlet weak var confirmButton: UIButton!
    @IBOutlet weak var nextButton: UIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "用户协议"
        // Do any additional setup after loading the view.
        getSurveyInfo()
    }

    @IBAction func nextButtonAction(_ sender: Any) {
        
        guard confirmButton.isSelected else {
            makeToast("请先同意以上条款")
            return
        }
        
        let fb = SurveyViewController()
        navigationController?.pushViewController(fb, animated: true)
        
    }
    @IBAction func confirmButtonAction(_ sender: Any) {
        confirmButton.isSelected = !confirmButton.isSelected
    }
    
    func getSurveyInfo() {
        NetworkingHandle.fetchNetworkString(method: "getNotificationInfo", paramString: "", success: { (str) in
            self.descView.text = str
        }) {
            print("")
        }
        
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
